﻿#ifndef DASTANDARDNODEGRAPHICSITEM_H
#define DASTANDARDNODEGRAPHICSITEM_H
#include "DAWorkFlowGlobal.h"
#include "DAAbstractNodeGraphicsItem.h"
DA_IMPL_FORWARD_DECL(DAStandardNodeGraphicsItem)
/**
 * @brief 标准的GraphicsItem
 */
class DAWORKFLOW_API DAStandardNodeGraphicsItem : public DAAbstractNodeGraphicsItem
{
    DA_IMPL(DAStandardNodeGraphicsItem)
public:
    enum { Type = DA::GraphicsStandardNodeItem };
    int type() const { return (Type); }
    DAStandardNodeGraphicsItem(DAAbstractNode *n, QGraphicsItem *p = nullptr);
    ~DAStandardNodeGraphicsItem();
    //计算BoundingRect
    virtual void calcBoundingRect();

public:
    //绘图
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
    //绘图相关
    QRectF boundingRect() const override;

protected:
    //添加事件处理
    virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
};

#endif // FCSTANDARDNODEGRAPHICSITEM_H
